package com.spatio.serving.basic.service.template.mysql.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import com.spatio.serving.basic.service.template.common.domain.HistoryCaloriesDo;
import com.spatio.serving.basic.service.template.common.domain.UserInfoDo;
import com.spatio.serving.basic.service.template.common.domain.UserLoginDo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigInteger;


@Mapper
public interface UserMapper extends BaseMapper<UserLoginDo> {

    boolean  checkPhoneNumberExists(String phoneNumber);

    boolean insertPhoneNumber(@Param("user_id") BigInteger user_id, @Param("phone_number")String phone_number);

    boolean update(UserInfoDo userDo);

    UserLoginDo findByPhoneNumber(String phoneNumber);

    UserInfoDo findById(BigInteger user_id);

    BigInteger checkUserExist(String phone);

    HistoryCaloriesDo findByIdAndTime(BigInteger userId);

    boolean updateDocId(@Param("user_id")BigInteger userID, @Param("doc_id")String docId);

    String queryDocId(BigInteger userId);


}
